<script setup lang="ts">
import { rbm } from '@/service'
const value = ref()
const { VITE_BACKEND_URL } = import.meta.env
const cbValue = ref()
const cbOption = ref()
const cbPathValues = ref()
const rbmImg = ref()
rbmImg.value = VITE_BACKEND_URL+"/static/rbm.png"
function handleUpdateValue(value: string, option: any, pathValues: any[]) {
  cbValue.value = value
  cbOption.value = { code: option.code, name: option.name }
  cbPathValues.value = pathValues.map(i => ({ code: i.code, name: i.name }))
}

const formRef = ref()
const formValue = ref({
  region: null,
})

async function handleValidateClick() {
  const res = await rbm()
  rbmImg.value = VITE_BACKEND_URL+"/static/"+res.data
  console.log(res.data)
}


</script>

<template>
  <n-card title="受限波尔兹曼机">
受限玻尔兹曼机(RBM)是一种基于概率模型的无监督非线性特征学习器。当馈入线性分类器（如线性支持向量机或感知机）时，用 RBM 或多层次结构的RBM提取的特征时通常会获得良好的结果。<n-button attr-type="button" @click="handleValidateClick">
          测试
        </n-button>
        <img
 
      :src="rbmImg"
      alt=""
      class="test-img"
    >
  </n-card>
</template>

<style scoped></style>
